#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2025 ArchR (https://github.com/archr-linux/Arch-R)

cat <<EOF >/storage/.config/profile.d/020-fan_control

FANPATH="\$(ls /sys/class/hwmon/hwmon*/pwm1 | grep hwmon | cut -c 18-24)"

DEVICE_HAS_FAN="true"
DEVICE_PWM_FAN="/sys/class/hwmon/\${FANPATH}/pwm1"
DEVICE_FAN_INPUT="/sys/class/hwmon/\${FANPATH}/pwm1"
EOF
